import request from '@/config/axios'

// 接口管理-客户端 VO
export interface InterfaceClientVO {
  id: number // 编号
  appId: string // 客户端编号
  secret: string // 客户端密钥
  name: string // 应用名
  description: string // 应用描述
  status: number // 状态
}

// 接口管理-客户端 API
export const InterfaceClientApi = {
  // 查询接口管理-客户端分页
  getInterfaceClientPage: async (params: any) => {
    return await request.get({ url: `/system/interface-client/page`, params })
  },

  // 查询接口管理-客户端详情
  getInterfaceClient: async (id: number) => {
    return await request.get({ url: `/system/interface-client/get?id=` + id })
  },

  // 新增接口管理-客户端
  createInterfaceClient: async (data: InterfaceClientVO) => {
    return await request.post({ url: `/system/interface-client/create`, data })
  },

  // 修改接口管理-客户端
  updateInterfaceClient: async (data: InterfaceClientVO) => {
    return await request.post({ url: `/system/interface-client/update`, data })
  },

  // 删除接口管理-客户端
  deleteInterfaceClient: async (id: number) => {
    return await request.get({ url: `/system/interface-client/delete?id=` + id })
  },

  // 导出接口管理-客户端 Excel
  exportInterfaceClient: async (params) => {
    return await request.download({ url: `/system/interface-client/export-excel`, params })
  },
}
